package com.gepengjun.lims.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.activerecord.Model;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author jun
 * @since 2018-09-07
 */
public class Orgnazation extends Model<Orgnazation> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "org_id", type = IdType.AUTO)
    private Long orgId;
    @TableField("parent_id")
    private Long parentId;
    @TableField("org_name")
    private String orgName;
    @TableField("org_code")
    private String orgCode;
    private Boolean available;
    @TableField("last_upd_user")
    private Long lastUpdUser;
    @TableField("last_upd_time")
    private Date lastUpdTime;
    private String remark;

    /**前台属性 begin**/
    @TableField(exist = false)
    private Orgnazation parent;
    @TableField(exist = false)
    private List<Orgnazation> children;
    /**前台属性 end**/

    public Long getOrgId() {
        return orgId;
    }

    public Orgnazation setOrgId(Long orgId) {
        this.orgId = orgId;
        return this;
    }

    public Long getParentId() {
        return parentId;
    }

    public Orgnazation setParentId(Long parentId) {
        this.parentId = parentId;
        return this;
    }

    public String getOrgName() {
        return orgName;
    }

    public Orgnazation setOrgName(String orgName) {
        this.orgName = orgName;
        return this;
    }

    public String getOrgCode() {
        return orgCode;
    }

    public Orgnazation setOrgCode(String orgCode) {
        this.orgCode = orgCode;
        return this;
    }

    public Boolean getAvailable() {
        return available;
    }

    public Orgnazation setAvailable(Boolean available) {
        this.available = available;
        return this;
    }

    public Long getLastUpdUser() {
        return lastUpdUser;
    }

    public Orgnazation setLastUpdUser(Long lastUpdUser) {
        this.lastUpdUser = lastUpdUser;
        return this;
    }

    public Date getLastUpdTime() {
        return lastUpdTime;
    }

    public Orgnazation setLastUpdTime(Date lastUpdTime) {
        this.lastUpdTime = lastUpdTime;
        return this;
    }

    public String getRemark() {
        return remark;
    }

    public Orgnazation setRemark(String remark) {
        this.remark = remark;
        return this;
    }

    public Orgnazation getParent() {
        return parent;
    }

    public void setParent(Orgnazation parent) {
        this.parent = parent;
    }

    public List<Orgnazation> getChildren() {
        return children;
    }

    public void setChildren(List<Orgnazation> children) {
        this.children = children;
    }

    @Override
    protected Serializable pkVal() {
        return this.orgId;
    }

    @Override
    public String toString() {
        return "Orgnazation{" +
                "orgId=" + orgId +
                ", parentId=" + parentId +
                ", orgName='" + orgName + '\'' +
                ", orgCode='" + orgCode + '\'' +
                ", available=" + available +
                ", lastUpdUser=" + lastUpdUser +
                ", lastUpdTime=" + lastUpdTime +
                ", remark='" + remark + '\'' +
                '}';
    }
}
